using System;
using Microsoft.SPOT;

namespace OST.Shared.SharedTypes
{
    /// <summary>
    /// enum with possible values for motot-states
    /// </summary>
    public enum enumMotorDrivingDirection
    {
        None = -1,
        EndDown = 0,
        EndUp = 1,
        MovingUp = 2,
        MovingDown = 3
    }

    /// <summary>
    /// string-translator for <see cref="enumMotorDrivingDirection"/>
    /// </summary>
    public static class enumMotorDrivingDirectionTranslator
    {
        /// <summary>
        /// translates motor-direction to a string
        /// </summary>
        /// <param name="engineState">motor-direction</param>
        /// <returns>readable string</returns>
        public static String Translate(enumMotorDrivingDirection engineState)
        {
            switch (engineState)
            {
                case enumMotorDrivingDirection.None:
                    return "None";
                case enumMotorDrivingDirection.EndDown:
                    return "EndDown";
                case enumMotorDrivingDirection.EndUp:
                    return "EndUp";
                case enumMotorDrivingDirection.MovingUp:
                    return "MovingUp";
                case enumMotorDrivingDirection.MovingDown:
                    return "MovingDown";
                default:
                    return "n.def.";
            }
        }
    }
}
